﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Silverlight.ControlToolkit;
using Silverlight.ControlToolkit.Windows;
using SL = Silverlight.ControlToolkit;

namespace Test.Silverlight.ControlToolkit
{
    public partial class Page : UserControl
    {
        public Page()
        {
            InitializeComponent();

            MyCustomer objCustomer = new MyCustomer();
            objCustomer.FirstName = "Jeetu";
            objCustomer.LastName = "Maker";
            objCustomer.BalanceDue = 500;
            this.DataContext = objCustomer;
        }
        SL.Windows.BusyBox objBusyBox;

        void Page_DialogBoxClosing(object sender, SL.Windows.DialogBoxClosingEventArgs e)
        {
            if (e.ActionTaken == SL.Windows.DialogResult.Cancel)
                e.Cancel = true;
        }

        private void btnStop_Click(object sender, RoutedEventArgs e)
        {
            //ExpandablePanel exP = new ExpandablePanel();
            //exP.HeaderText = "My YAHOOO !!!";
            //this.myStackPanel.Children.Add(exP);


            objBusyBox.CloseDialog();
        }

        private void btnStart_Click(object sender, RoutedEventArgs e)
        {
           
            objBusyBox = BusyBox.Show("My 1st Test JKHJGD JDGHJSD KJDSHG");
            MessageWindow.Show(this, "Please asdsd  askj sads asdjklkjsd asd jklsdkljsda sdjhksdaj sdlkdsjsd asdjds adsajdh asdhjsad sadjhhs ad sds set the total number of BET(draws) you want to have.", MessageWindowButtons.OKCancel, MessageWindowDefaultButton.Button1, MessageWindowIcon.Information).DialogBoxClosing += new DialogBoxClosingEventHandler(Page_DialogBoxClosing); 

        }

        public class MyCustomer
        {
            public string FirstName { get; set; }
            public string LastName { get; set; }
            public decimal BalanceDue { get; set; }
        }
    }
}
